package pers.wensheng.patterns.creator_pattern.factory_pattern.simple_factory_pattern;

import pers.wensheng.patterns.creator_pattern.factory_pattern.simple_factory_pattern.entity.Coffee;
import pers.wensheng.patterns.creator_pattern.factory_pattern.simple_factory_pattern.factory.SimpleCoffeeFactory;

/**
 *  咖啡馆
 */
public class CoffeeStore {
    public Coffee orderCoffee(String type){
        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();
        Coffee coffee = factory.createCoffee(type);

        //加奶加糖
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
